package com.ihr360.commons.model.type;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.ihr360.commons.model.annotation.EnumData;
import com.ihr360.commons.serializer.jackson.EnumDataSerializer;

import java.io.Serializable;

/**
 * 服务实体应用于
 *
 * @author richey
 */
@EnumData
@JsonSerialize(using = EnumDataSerializer.class)
public enum AppliedTo implements Serializable {


    PAYROLLCONFIG("薪资表"),
    SALARYFIELD_FORMULAR("薪资字段公式项"),
    STAFF_SALARY("员工薪资");

    private String title;


    @JsonCreator
    public static AppliedTo factory(@JsonProperty(value = "id") String id) {
        return AppliedTo.valueOf(id);
    }


    AppliedTo(String title) {
        this.title = title;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }
}
